package com.xja.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.xja.entity.Orderinfo;
import com.xja.mapper.OrderinfoMapper;
import com.xja.service.OrderinfoService;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 *
 * @author 周广瑞
 * @date  2022/4/24 19:56
 * 
 */
@Service
public class OrderinfoServiceImpl implements OrderinfoService{

    @Resource
    private OrderinfoMapper orderinfoMapper;

    @Override
    public int deleteByPrimaryKey(Integer oid) {
        return orderinfoMapper.deleteByPrimaryKey(oid);
    }

    @Override
    public int insert(Orderinfo record) {
        return orderinfoMapper.insert(record);
    }

    @Transactional(readOnly = true)
    @Override
    public List<Orderinfo> selectByUid(Integer oid) {
        return orderinfoMapper.selectByUid(oid);
    }

    @Transactional(readOnly = true)
    @Override
    public List<Orderinfo> selectByBookId(Integer bid) {
        return orderinfoMapper.selectByBookId(bid);
    }
    @Transactional(readOnly = true)
    @Override
    public Orderinfo selectOrderByOid(Integer oid) {
        return orderinfoMapper.selectOrderByOid(oid);
    }

    @Override
    public int updateByPrimaryKey(Orderinfo record) {
        return orderinfoMapper.updateByPrimaryKey(record);
    }

    @Transactional(readOnly = true)
    @Override
    public List<Orderinfo> slectOrder() {
        return orderinfoMapper.slectOrder();
    }

}
